#include <iostream>

using namespace std;

const int N = 35;
int f[N][N];
int n, m;

int main()
{
	cin >> n >> m;
	f[0][1] = 1;
	for(int i = 1; i <= m; i++)
	{
		for(int j = 1; j <= n; j++)
		{
			if(j >= 2 && j <= n - 1) f[i][j] = f[i - 1][j - 1] + f[i - 1][j + 1];
			else if(j == 1) f[i][j] = f[i - 1][2] + f[i - 1][n];
			else f[i][j] = f[i - 1][n - 1] + f[i - 1][1];		
		}
	}
	cout << f[m][1] << endl;
	return 0;
}
